import server from "@/utils/request";


export const favorites_create = (params)=>{
    return server({
        method:'post',
        url:'/favorites',
        data:params
    })
}

export const favorites_list = ()=>{
    return server({
        method:'get',
        url:'/favorites'
    })
}

export const favorites_edit = (id,params)=>{
    return server({
        method:'put',
        url:`/favorites/${id}`,
        data:params
    })
}

export const favorites_del = (params)=>{
    return server({
        method:'delete',
        url:`/favorites/${params.id}`
    })
}
export const validate_url = (params)=>{
    return server({
        method:'post',
        url:'/favorites/validate/url',
        data:params
    })
}

export const add_url = (params)=>{
    return server({
        method:'post',
        url:'/knowledge/add/url',
        data:params
    })
}

